<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<script type="text/javascript" charset="utf-8">
	$.messager.progress({
		text : '<s:text name="DataLoading"></s:text>....',
		interval : 100
	});
	
	var bianHao = '<%=request.getParameter("bianHao")%>';
	var zhuangTai = $("#form").find('input[name=zhuangTai]');
	var iconCombo = zhuangTai.combobox({//加载下拉菜单
		url : 'mainAction!cache.action?cacheKey=ZhuangTai',
		valueField : 'detailID',
		textField : 'detailName',
		editable : false,
		panelHeight : 'auto',
		onSelect : function(){
			var value = zhuangTai.combobox('getValue');
			if(value=="11"){
				$(".dialog-button a").attr("disabled",false);
				$("#ff").val("");
			}else if(value=="12"){
				$.ajax({
					type 	: 'post',
					url		: 'jueSeAction!check.action',
					data	: {bianHao:bianHao},
					success:function(jsonStr){
						var haveOne = (new Function("return " + jsonStr))();
						if (haveOne) {// 存在
							$(".dialog-button a").attr("disabled",true);
							$("#ff").val("haveElements");
							parent.dagong.messagerShow({
								msg : '该角色下已有用户，不允许设置成失效状态！',
								title : '<s:text name="prompt"></s:text>'
							});
						}
					}
				});
			}
		}
	});
</script>

<div align="center" style="padding: 5px;overflow: hidden;">
	<form method="post" id="form">
		<input name="bianHao" type="hidden"/>
		<input id="ff" type="hidden"/>
		<table class="table"  cellSpacing=0 cellPadding=0 width="100%">
			<tr>
				<td  class="title"  style="width:100px" nowrap="nowrap"><s:text name="jueSeMC"></s:text></td>
				<td  class=content_L>
					<input name="jueSeMC" class="text easyui-validatebox" data-options="required:true" />
				</td>
			</tr>
			<tr>
				<td class="title" nowrap="nowrap">权限</td>
				<td class=content_L>
					<input name="gongNengBH" class="text" style="width:300px;" readOnly/>
				</td>
			</tr>
			<tr>
				<td class="title"   nowrap="nowrap">顺序</td>
				<td class=content_L >
					<input name="shunXu" class="text easyui-validatebox" data-options="required:true, validType: 'checkShunXu'"  />
				</td>
			</tr>
			<tr>
				<td class="title" nowrap="nowrap"><s:text name="zhuangTai"></s:text></td>
				<td class=content_L>
					<input name="zhuangTai" data-options="validType:'selectValueRequired'"  style="width:300px;"/>
				</td>
			</tr>
			<tr>
				<td  class="title"  nowrap="nowrap"><s:text name="chuangJianSJ"></s:text></td>
				<td  class=content_L>
					<input name="chuangJianSJ" class="text"  readonly="readonly"/>
				</td>
			</tr>
		</table>
	</form>
</div>